
function eventDockStateChanged() {
	if (System.Gadget.docked) {
		/*
		 * code
		 */
		$(document.body).removeClass('undocked')
						.addClass('docked')
						.css('width', WIDTH_DOCKED)
						.css('height', HEIGHT_DOCKED);
		$('#background').css('width', WIDTH_DOCKED)
						.css('height', HEIGHT_DOCKED)
						.attr('src', BACKGROUND_IMG_DOCKED);
	} else {
		/*
		 * code
		 */
		$(document.body).removeClass('docked')
						.addClass('undocked')
						.css('width', WIDTH_UNDOCKED)
						.css('height', HEIGHT_UNDOCKED);
		$('#background').css('width', WIDTH_UNDOCKED)
						.css('height', HEIGHT_UNDOCKED)
						.attr('src', BACKGROUND_IMG_UNDOCKED);
	}
	$('#background').get(0).addShadow("black", 20, 80, 5, 5); // Тень делает шняжку красивее :)
}

var episodeMouseOver = function(element) {
	divs = element.getElementsByTagName("div");
	divs[0].style.display = "none";
	divs[1].style.display = "block";
};
var episodeMouseOut = function(element) {
	divs = element.getElementsByTagName("div");
	divs[0].style.display = "block";
	divs[1].style.display = "none";
};